Source Code Analysis Techniques in Property Verification of Real Java Code
نویسندگان
چکیده
The rapid growth of computer industry requires creating large, highly complicated and sophisticated software. This implies increasing probability for errors, bugs and failures. Various software verification techniques are used to ensure quality of produced programs. Unfortunately, verification using formal methods is not very popular, because it is considered not practical and expensive. Therefore, formal methods are used to verify only high risk programs, such as control software for nuclear power plants or flight control software in airplanes. The goal of this thesis is to design a static analysis technique that uses formal methods and can be applied to real, large computer software created in Java language. Three topics were raised. First, the thesis focuses on the abstract interpretation framework, which is a theory of sound approximation of program semantics. In particular, we are interested in numerical abstract domains. We propose a new approach on the abstract domain of boxes, which is a disjunctive refinement of the domain of intervals, and we introduce thresholds in the construction of the widening operator for the domain. We present a construction of domain elements based on the sweeping line technique, implementation of domain operators, transfer function and widening operator. We introduce two versions of the widening operator: a generic one, and the second one with a theorem about one-step precision of the operator depending on thresholds. Next, practicality of formal methods is investigated. A tool CodeStatistics is introduced, that makes it possible to discover particular coding patterns on large Java projects and to generate specifications. An experiment is described, where the tool was successfully used to generate JML loop termination specifications on a set of large and popular Java projects. Finally, an extension of the pattern discovery technique from the second part by the use of a semantic analysis is presented, in particular by abstract interpretation. It is shown that the combination is useful in evaluating abstract interpretation domains on real code. Additionally, it is presented that the new widening operator introduced in the first part of the thesis is more precise in practice than the one known so far.
منابع مشابه
JAIL: Firewall Analysis of Java Card by Abstract Interpretation
We introduce JAIL, a tool for the static analysis and the verification of the applet isolation property of Java Card, where applet isolation means that one applet can not access the fields or objects of an applet in another context unless the other applet explicitly provides an interface for access. The tool statically checks whether the analyzed source code violates this property, thus detecti...
متن کاملD6.6: Development-Time and On-Device Interplay
In the field of annotation-based source code level program verification for Java-likelanguages, separation-logic based verifiers offer a promising alternative to classic JML basedverifiers such as ESC/Java2, the Mobius tool or Spec#. Researchers have demonstrated theadvantages of separation logic based verification by showing that it is feasible to verify verychallenging (though...
متن کاملA Survey on Model Checking Java Programs
Due to the recent advancements of the Internet, Java has become a dominant programming language, especially for coding concurrent applications. Finite state verification is a powerful technique for detecting subtle errors in a program. This paper reviews recent attempts to transform Java source code into a model that can be checked using verification tools. Two classes of techniques are reviewe...
متن کاملFormal Verification of Components in Java
Title: Formal Verification of Components in Java Author: Pavel Paŕızek email: [email protected] phone: +420 2 2191 4235 Department: Department of Software Engineering Faculty of Mathematics and Physics Charles University in Prague, Czech Republic Advisor: Prof. Frantǐsek Plášil email: [email protected] phone: +420 2 2191 4266 Mailing address (both Author and Advisor): Dept. of SW E...
متن کاملThe Gradual Verifier
Static verification traditionally produces yes/no answers. It either provides a proof that a piece of code meets a property, or a counterexample showing that the property can be violated. Hence, the progress of static verification is hard to measure. Unlike in testing, where coverage metrics can be used to track progress, static verification does not provide any intermediate result until the pr...
متن کامل